﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
using UltraToys.Excel.Interop;
using System.Diagnostics;

namespace ExcelTest
{
    public partial class Ribbon1 : OfficeRibbon
    {
        public Ribbon1()
        {
            InitializeComponent();
        }

        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {

        }

        private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            VBAMacro VBA = new VBAMacro(Globals.ThisAddIn.Application);

            foreach (string Macro in VBA.Macros)
            {
                Debug.WriteLine(Macro);
                VBA.ExecuteMacro(Macro);
            }
        }
    }
}
